.PHONY: clean
CC = gcc
RM = rm -f
EXE = simple
# 定义DEBUG 方式为 -g -O2
DEBUG = -g -O2
CFLAGS = $(DEBUG) -Wall -c
OBJS = main.o foo.o
${EXE}: ${OBJS}
	${CC} -o ${EXE} ${OBJS}
main.o: main.c
	${CC} $(CFLAGS) -o main.o -c main.c
foo.o: foo.c
	${CC} $(CFLAGS) -o foo.o -c foo.c
clean:
	${RM} ${EXE} ${OBJS}